Method and device to transfer a video stream between a host device and an electronic descrambling device

ABSTRACT

A method to transfer a video stream from a host device comprising a controller configured for bulk transfers to a descrambling device, comprises: forming a chain out transfer comprising a chain out header linked with multiple chain out descriptors, the first chain out descriptor pointing to an out description packet containing at least one producer ID, the second and subsequent chain out descriptor pointing to chunks from the video stream, the last chain out descriptor being configured to generate an interrupt; forming a chain in transfer comprising a chain in header linked with a plurality of chain in descriptors, each chain in descriptor pointing to a descrambled chunk; requesting the controller to process the chain; receiving the description packet by the descrambling device and using key data associated with the chunks to descramble them; receiving by the controller the descrambled chunks and triggering an interrupt on the last chunk.

CROSS-REFERENCE TO RELATED APPLICATIONS

This is a continuation application of U.S. application Ser. No.15/755,344, filed Feb. 26, 2018, which is a National Stage ofInternational Application No. PCT/EP2016/070274, filed Aug. 29, 2016,which claims the benefit of European Patent Application No. 15183327.4,filed Sep. 1, 2015, the entire contents of each of which are herebyincorporated by reference herein in their entirety.

INTRODUCTION

Multimedia contents may be transmitted in various ways from a providerto an end user. In order to protect this valuable content, scrambling(encrypting) may be performed to the content so that only authorizedpersons can have access to it.

Reception of the scrambled multimedia content may be done on differentdevices such as a personal computer, a tablet, a smartphone, or otherdevices that may not have the necessary descrambling (decrypting)capabilities to access the content.

BRIEF DESCRIPTION OF THE INVENTION

In one embodiment, an electronic descrambling device may be connected toa host device and configured to descramble multimedia content. Anelectronic descrambling device is a portable module comprisingelectronic chips connected via a communication port with the hostdevice. It is generally called “dongle”. The electronic chip comprises adescrambling engine and memories to temporary store the incoming datachunk. According to a particular embodiment, the electronic descramblingdevice is a USB dongle and the video stream is a MPEG stream.

Currently, transfer protocols to an electronic descrambling device arenot adapted to the continuous exchange of data at a bit rate compatiblewith video streams. They have been designed to accommodate the transferof storage data. To address this problem, it is proposed a method todescramble at least one video stream originating from at least oneproducer, having a producer ID, by an electronic descrambling deviceconnected to a host device, said host device comprising a controllercomprising a bulk pipe out and a bulk pipe in transfer, comprising, atthe host device:

for each producer, defining a chunk of data from the video stream,

forming a chain of out transfer, the chain of out transfer comprising achain out header (oqH) linked with a plurality of chain out descriptors(oqTD), the first chain out descriptor pointing to a out descriptionpacket containing the at least one producer ID, the second andsubsequent chain out descriptor pointing to the chunk of data, eachchunk of data being of a particular producer,

forming, by the host device, a chain of in transfer, the chain of intransfer comprising a chain in header (iqH) linked with a plurality ofchain in descriptors (iqTD), each chain in descriptor pointing to adescrambled chunk of data, and the last chain in descriptor beingconfigured to generate an interrupt,

transferring the chain of out transfer by the controller to theelectronic descrambling device, thus transferring to the electronicdescrambling device the scrambled data chunk, at the electronicdescrambling device:

receiving the description packet by the electronic descrambling deviceand identifying by the electronic descrambling device key dataassociated with the at least one chunk,

using the key data to descramble the scrambled data chunk,

returning the descrambled data to the host device, at the host device:

receiving the chain of in transfer by the controller, thus waiting fromthe electronic descrambling device the chunk descrambled data,

storing the received descrambled data chunk at an address indicated bythe correspond chain in descriptor (iqTD),

triggering an interrupt by the reception of the last descrambled chunk.

The format of the multimedia content is preferably an MPEG stream. AnMPEG stream typically comprises several sub-streams having each adifferent packet identifier (PID). Examples of sub-streams are audio,video, data, and caption. Sub-streams pertain to the same multimediacontent from a channel A MPEG stream can comprise several channels, thedescription of each sub-stream being located into the Program Map Table(PMT). As far as the scrambling of data is concerned, the keys loadedinto the electronic descrambling device are dedicated to a sub-streamand identified using the producer ID and the PID.

BRIEF DESCRIPTION OF THE FIGURES

The following detailed description will be better understood thanks tothe attached figures in which:

FIG. 1 illustrates a block diagram of the host device in connection withthe electronic descrambling device,

FIG. 2 illustrates the format of the chain in and out queue accordingone example of the invention,

FIG. 3a illustrates a first embodiment of the transfer chain,

FIG. 3b illustrates a second embodiment of the transfer chain,

FIG. 4 illustrates the management of the queues in a buffer,

FIG. 5 illustrates an example of the modules in a electronicdescrambling device.

DETAILED DESCRIPTION

FIG. 1 illustrates the different components of one embodiment of theinvention. The Host (which may be for example a home multimediareceiver) comprises various layers. The top layer may be the TV NativeApplication. A Middleware layer may include a DVB Middleware and theMedia Player modules. The OS Drivers may be lower layers containing theStream Management Unit in charge of executing one embodiment of theinvention. The communication layer SoC may be configured for thehandling of the MPEG streams and may include the communication module(USB controller) with the electronic descrambling device. In thefollowing description, the electronic descrambling device will be named“dongle”.

FIG. 2 describes one example of the formatting of a chain for acontroller, in particular a USB controller. The application layer, inthe host device, receives the MPEG stream (or a plurality of MPEGstreams) and formats the chain in and chain out (CT) in order toinstruct the USB controller. The chain out starts with a chain outheader (oqH) playing the role of the link with the chain out descriptors(oqTD1 to oqTDn). The first chain out descriptor (oqTD1) is pointing tothe out description packet containing the at least one producer ID. Theapplication layer is in charge of composing the chains and extracts theproducer ID from the MPEG stream. The application layer then loads theproducer ID into the out description packet (oDP).

The first chain out descriptor (odTD1) points to the second chain outdescriptor (odTD2). This second chain out descriptor (and the followingchain out descriptors) points to the chunk of data extracted from theMPEG stream. The application layer handling the MPEG stream splits thestream into chunks of data and loads them into the buffer memory at anaddress loaded into the chain out descriptor.

The application layer can load more than one chunk into the chain inaccordance with the maximum number of chain out descriptors handled bythe chain.

According to the example of FIGS. 3a and 3b , when the application layeris processing more than one MPEG stream, the producer ID of each streamis loaded into the out descriptor packet (oDP). This is illustrated bythe FIG. 3b in which three streams are processed and the producer ID1,the producer ID2 and the producer ID3 are loaded into the out descriptorpacket.

The MPTS1 Data, forming the first data chunk, is then pointed by thesecond chain out descriptor (oqTD2), the MPTS2 Data, forming the seconddata chunk, is then pointed by the third chain out descriptor (oqTD) andthe MPTS3 Data, forming the third data chunk, is then pointed by thefourth chain out descriptor (oqTD1).

The application layer also configures the chain in. The chain in andchain out are connected together and form a single event. Onceconfigured, the application layer calls the USB controller to executethe chain operations. The chain in is a chain starting with a chain inheader (iqH) linked with a plurality of chain in descriptors (iqTD).Each chain in descriptor points to a chunk of data resulting from theprocessing (i.e. descrambling) by the USB dongle.

The last chain in descriptor (iqTDn) is configured to trigg an interruptwhen the USB controller receives the last chunk of processed data by theUSB dongle.

Each chain in descriptor is associated with a MPEG stream. Depending ofthe implementation of the USB controller, the size of data chunk canvary. According to one example, a data chunk comprises a plurality ofpackets. Each packet represents a USB transaction. According to oneexample of forming a chain of packets, each packet has a size equal tothe nominal size (e.g. 512 Bytes), except the last packet. Thenon-nominal size of the packet indicates that this is the last packet ofthe data chunk. This is illustrated in the FIG. 2 by the box DCo1 toDCop. The last packet of the data chunk has a size different than thenominal size, thus indicating that it is the last packet of the datachunk.

According to another example of realization, the chain out transfer isconfigured such as the producer ID is placed in the data chunk, into thefirst packet. The producer ID is placed in a data header preceding thedata chunk and both are concatenated by the USB controller andtransferred in a single USB transaction.

This is the case illustrated at the FIG. 3A. The first chain outdescriptor points to at least two packets, one being the packetcontaining the producer ID and the second one (and further ones) beingthe packets of the data chunk of the MPEG stream. The chain in is thesame as in the first example.

When the USB controller is supporting both 3 a and 3 b, 3 a and 3 bshare a common field in their respective header allowing the dongle USBcontroller to differentiate between a 3 a and a 3 b chain of descriptor.This allows a host to choose the most efficient transfer for a specificprocessing.

Once the chain out and in is configured, the USB controller receives asignal from the application layer and the chain is processed. Thetransfer to the USB dongle is executed by the USB controller for exampleusing the bulk in and out transfer. The USB controller activates andtransfers the data as instructed.

The USB dongle receives the chain out and retrieves the producer ID fromthe corresponding packet. With the producer ID, the USB dongle canretrieve the key data corresponding to the data chunk. The USB donglereceives through another USB channel, key data related to the MPEGstreams to proceed.

The USB dongle comprises a key table populated with the key data foreach MPEG stream. According to a first example, the key table comprisesfor each producer ID, the key data related to this producer. Preferably,the key data comprises an odd and an even key, one being currently usedand the other one ready for the next key change. A bit in the chunk dataindicates the current key to be used.

This key table can further contain a packet identifier PID (or programID) in case one producer ID is associated with a plurality of key data.The table will be then as follows:

Producer ID PID ID Key odd Key even PRID1 PID12 Value Value PRID1 PID15Value Value PRID2 PID3 Value Value PRID3 PID10 Value Value

An example of the value of the keys is a 128 bits pseudorandom number.

In the above example, the producer PRID1 is associated with an MPEGstream comprising two sub-streams needing key data to be descrambled.Each sub-stream is identified by a PID identifier or program ID (in ourexample PID12 and PID15), each sub-stream being associated withdifferent key data.

The key table is received by the host device from an authorizationserver or can be extracted from one or more MPEG stream. According to anembodiment of the invention, the USB dongle comprises the key(s)necessary to decrypt the encrypted key data. The encrypted key data canbe in the form of ECM (Entitlement Control Message) extracted from theMPEG stream by the host and transferred to the USB dongle.

According to another embodiment, the host can request a license filefrom an authorization server and can pass the license file to the USBdongle once received from the authorization server. The license file isdecrypted and the key data are used to populate the key table. The USBdongle can comprise a personal key to decrypt the encrypted key data(license or ECM).

Once the USB dongle has descrambled the data chunk using thecorresponding key data, the descrambled data chunk are sent to the hostdevice, in particular to the USB controller. The latter stores thereceived data at the address indicated in the first chain outdescriptor. As a consequence, a data chunk DCo1 is transferred by theUSB controller to the USB dongle and when the USB dongle returns thedata chunk DCi1, the USB controller stores it at the address indicatedby the first chain in descriptor iqTD1.

When the last data chunk has been stored in the chain in queue the USBcontroller initiates an interrupt to inform the application layer.

The application layer can then retrieve the descrambled data chunk andcan deliver it to a consumer such as a multimedia player.

It is to be noted that a MPEG stream is loaded into a stream buffer asillustrated at the FIG. 4. The host can process several MPEG streams inparallel and the FIG. 4 illustrates two MPEG streams from two producers(Producer#1, Producer#2). The application layer is in charge of themanagement of the Stream Buffer#1 and #2. A buffer is dedicated to oneproducer and the application layer mainly deals with the pointers of thebuffer. The buffer is filled with data coming from an MPEG source. Whenthe chain in and chain out are defined, the USB controller process thedata chunk (chunk#1 for the Producer#1 and chunk#2 for the Producer#2)so that more than one MPEG source can be processed in parallel. Theconsumer is using the buffer architecture and handles its own pointersto the descrambled data.

According to the illustrated example, the stream buffer is the same forthe scrambled and descrambled data. However, in accordance with anotherexample, the buffer for the scrambled data is independent to the bufferof the descrambled data. In this case, the USB controller, whilereceiving the descrambled chunk from the USB dongle, stores them intothe in buffer.

This formatting and handling of chain buffer is particularly adapted toUSB 2.0 transmission.

However, other protocol layer can be used to transfer the data based onstream buffer and chain pointer and descriptor as described above.

FIG. 5 illustrates a block diagram of the dongle. The dongle comprisesfour main blocks, the I/O interface block, the processing block PO_M,the memory MEM and the descrambling module DES_M.

The I/O interface is connectable with the host device to receive thedata via the dedicated USB signals. The processing block PRO_M is incharge of directing the flow of data entering and exiting via the I/OInterface to the memory MEM. The memory acts as a buffer memory and thepointers (in and out pointers) are handled by the processing block. Thedata chunks are stored in the memory and the pointer for this chunk ispassed to the descrambling module. The processing block also keep trackof the producer ID for said chunk of data and loads the related keysinto the descrambling module. The descrambling module, when the chunk isdescrambled, stores the descrambled chunk and sends a signal to theprocessing module. The pointer is then passed to the I/O interface whichroutes the descrambled chunk into the I/O Interface. The processingblock is in charge of executing the chain's instruction. The structureof the chain is known by the processing block and the elements of thechain extracted so that the processing block knows for each data chunk,which producer ID is related to. For that purpose, the processing blockis connected with a key memory K_MEM to store the keys received from thehost device via the USB Interface.

According to another embodiment, the keys memory K_MEM is directlyconnected to the descrambling module and this module, when theprocessing block instructs to descramble a data chunk identified byproducer ID, loads the keys related to said producer ID in the keyregisters.

Although an overview of the inventive subject matter has been describedwith reference to specific example embodiments, various modificationsand changes may be made to these embodiments without departing from thebroader spirit and scope of embodiments of the present invention. Forexample, various embodiments or features thereof may be mixed andmatched or made optional by a person of ordinary skill in the art. Suchembodiments of the inventive subject matter may be referred to herein,individually or collectively, by the term “invention” merely forconvenience and without intending to voluntarily limit the scope of thisapplication to any single invention or inventive concept if more thanone is, in fact, disclosed.

The embodiments illustrated herein are believed to be described insufficient detail to enable those skilled in the art to practice theteachings disclosed. Other embodiments may be used and derivedtherefrom, such that structural and logical substitutions and changesmay be made without departing from the scope of this disclosure. TheDetailed Description, therefore, is not to be taken in a limiting sense,and the scope of various embodiments is defined only by the appendedclaims, along with the full range of equivalents to which such claimsare entitled.

1. A method to descramble at least one video stream, originating eachfrom a producer and received by a host device, using an electronicdescrambling device connected to the host device, the method comprising:splitting the video stream into scrambled data chunks in the hostdevice; transferring the scrambled data chunks to the electronicdescrambling device within a chain out transfer structure, the chain outtransfer structure comprising a chain out header linked with a pluralityof chain out descriptors, a first chain out descriptor pointing to anout description packet containing at least one producer ID, eachproducer ID identifying a single producer, and subsequent chain outdescriptors pointing each to one scrambled data chunk, each scrambleddata chunk being associated to a single producer ID of the first chainout descriptor; descrambling the scrambled data chunks in the electronicdescrambling device using pre-loaded key data associated thereto, saidkey data being identified thanks to the producer ID which is bothassigned to the key data and provided through the chain out transferstructure; returning the descrambled data chunks to the host devicewithin a chain in transfer structure, the chain in transfer structureincluding a chain in header linked with a plurality of chain indescriptors, each chain in descriptor pointing to a descrambled datachunk, and a last chain in descriptor configured to generate aninterrupt; storing each of the received descrambled data chunks in thehost device at an address indicated by the corresponding chain indescriptor; and triggering an interrupt in response to reception of thelast chain in descriptor.
 2. The method of claim 1, wherein theelectronic descrambling device is a universal serial bus dongle.
 3. Themethod of claim 1, wherein the at least one video stream is compliantwith a Moving Picture Experts Group (MPEG) standard.
 4. The method ofclaim 3, wherein the at least one MPEG stream is formed by a SingleProgram Transport Stream (SPTS) having one packet identifier (PID). 5.The method of claim 4, wherein the chain out transfer structure containsdifferent types of producers selected among SPTS, Multi Programtransport stream (MPTS), or raw MPEG, each identified using anassociated producer ID.
 6. The method of claim 3, wherein the at leastone MPEG stream comprises a Multi Program transport stream (MPTS)comprising a plurality of sub-streams, each having a program ID, saidmethod further comprising inserting in the out description packet aprogram ID of each sub-stream, the chain in transfer structurecontaining at least one data chunk associated with each program ID; andinforming a media player that the at least one data chunk of the chainin transfer structure is descrambled.
 7. The method of claim 6, whereinat least a first and a second MPEG stream are transferred to theelectronic descrambling device, each having a different producer ID, themethod further comprising inserting in the first chain out descriptorthe producer ID of the first stream and the producer ID of the secondstream; and inserting in the second chain out descriptor a data chunkfrom the first MPEG stream and in a third chain out descriptor a datachunk from the second MPEG stream.
 8. The method of claim 1, wherein thekey data are transferred to the electronic descrambling device through adedicated channel, each key data being dedicated to one packetidentifier (PID), the key data being used with a data chunkcorresponding to the respective PID.
 9. The method of claim 1, whereineach descrambled data chunk is re-encrypted by a channel key sharedbetween the host device and the electronic descrambling device.
 10. Ahost device having an interface connectable to an electronicdescrambling device for exchanging data therewith, in particular fortransferring at least one scrambled video stream thereto, each videostream being originating from a producer, said host device comprising: amemory storing instructions; and a processing block configured toexecute the instructions to perform out and in transfers, saidprocessing block being configured to split the video stream intoscrambled data chunks; form a chain out transfer structure comprising achain out header linked with a plurality of chain out descriptors, afirst chain out descriptor pointing to an out description packetcontaining at least one producer ID, each producer ID identifying asingle producer, and subsequent chain out descriptors pointing each toone scrambled data chunk, each scrambled data chunk being associated toa single producer ID of the first chain out descriptor; transfer thescrambled data chunks to the interface within the chain out transferstructure; receive descrambled data chunks within a chain in transferstructure from the interface, the chain in transfer structure includinga chain in header linked with a plurality of chain in descriptors, eachchain in descriptor pointing to a descrambled data chunk, and a lastchain in descriptor configured to generate an interrupt; store each ofthe received descrambled data chunks in the host device at an addressindicated by the corresponding chain in descriptor; and trigger aninterrupt in response to reception of the last chain in descriptor. 11.The host device of claim 10, wherein the video stream is compliant witha Moving Picture Experts Group (MPEG) standard and comprises a MultiProgram transport stream (MPTS) comprising a plurality of sub-streamseach having a packet identifier (PID), the processing block beingfurther configured to insert in the out description packet a program IDof each program, the chain in transfer structure containing at least onedata chunk associated with each program ID, inform a media player thatthe at least one data chunk of the chain in transfer structure isdescrambled.
 12. The host device of claim 10, wherein a first and asecond video stream are transferred to the interface, each having adifferent producer ID, the processing block being further configured toinsert in the first chain out descriptor the producer ID of the firststream and the producer ID of the second stream; insert in the chain outtransfer structure a first consumer identification of the first streamand a second consumer identification of the second stream; insert in thechain out transfer structure at least two data chunks, one of the firststream and one of the second stream; and inform a first consumer and asecond consumer that the data chunks are descrambled.
 13. The hostdevice of claim 10, wherein each descrambled data chunk received throughthe interface is encrypted using a shared channel key and the processingblock is further configured to decrypt each descrambled data chunk usingsaid channel key.
 14. An electronic descrambling device for descramblingat least one video stream, each originating from a producer, saidelectronic descrambling device being configured to receive a chain ofout transfer from an I/O interface connectable with a host device andthus receive a scrambled data chunk, wherein the data chunk is of aparticular producer and defined from the video stream , and the chain ofout transfer comprises a chain out header linked with a plurality ofchain out descriptors, the first chain out descriptor pointing to a outdescription packet containing a producer ID, the second and subsequentchain out descriptor pointing to the data chunk, receive the outdescription packet; retrieve the producer ID from said out descriptionpacket; identify key data associated with the data chunk with theproducer ID; use the key data to descramble the scrambled data chunk,return the descrambled data to the I/O interface connectable with thehost device.
 15. The electronic descrambling device according to claim14, wherein the electronic descrambling device is a USB Dongle.
 16. Theelectronic descrambling device according to claim 14, comprising a keytable populated, for each of a plurality of producer IDs, with key datarelated to said producer ID.
 17. The electronic descrambling deviceaccording to claim 16, wherein the key table contains a packetidentifier PID or a program ID, in case one producer ID is associatedwith a plurality of key data.
 18. The electronic descrambling deviceaccording to claim 14, comprising a personal key and further configuredto receive the key data encrypted from the host device, and to decryptthe encrypted key data with the personal key.
 19. The electronicdescrambling device according to claim 18, configured to obtain theencrypted key data in the form of an Entitlement Control Message. 20.The electronic descrambling device according to claim 18, configured toobtain the encrypted key data in a license file.
 21. The electronicdescrambling device according to claim 14, comprising the I/O interfaceconnectable with the host device, a memory acting as a buffer memory andconfigured to store data chunks, a processing block in charge ofdirecting a flow of data entering or exiting via the I/O interface tothe memory, and a descrambling module, wherein the processing block isconfigured to handle in and out pointers of the buffer memory, pass thepointer for a data chunk stored in the memory to the descramblingmodule, keep track of the producer ID for said data chunk and load therelated key data into the descrambling module.
 22. The electronicdescrambling device according to claim 14, comprising a key memory tostore the key data received from the host device.